// JavaScript Document
<!--
function countDown(object) {
	var count = parseInt(document.getElementById(object).innerHTML);
	if (count > 0) {
		document.getElementById(object).innerHTML = count - 1; 
		window.setTimeout("countDown('" + object + "')", 1000);
	} else {
		window.location.href = "/";
	}
}

function save_cookie(cookie_name, cookie_value) {
	document.cookie = cookie_name + "=" + cookie_value;
}

function isemail(email) {
	var re = /^(\w|[^_]\.[^_]|[\-])+(([^_])(\@){1}([^_]))(([a-z]|[\d]|[_]|[\-])+|([^_]\.[^_]) *)+\.[a-z]{2,3}$/i;
	return re.test(email);
}

function news_source(id) {
	var source = null;
	switch (id) {
	case 1:source = "24h.com.vn";break;
	case 2:source = "BongDa.com.vn";break;
	case 3:source = "BongDaSo.com";break;
	case 4:source = "CAND.com.vn";break;
	case 5:source = "TheThao.DanTri.com.vn";break;
	case 6:source = "DanTri.com.vn";break;
	case 7:source = "DoThi.net";break;
	case 8:source = "GiaDinh.net.vn";break;
	case 9:source = "NgoiSao.net";break;
	case 10:source = "TheThao.VietNamNet.vn";break;
	case 11:source = "NLD.com.vn";break;
	case 12:source = "SoHoa.net";break;
	case 13:source = "ThanhNien.com.vn";break;
	case 14:source = "TienPhong.vn";break;
	case 15:source = "TimNhanh.com";break;
	case 16:source = "TinTucOnline.com";break;
	case 17:source = "TuoiTre.com.vn";break;
	case 18:source = "TheThao.VietNamNet.vn";break;
	case 19:source = "VietNamNet.vn";break;
	case 20:source = "vnExpress.net";break;
	case 21:source = "vnMedia.vn";break;
	case 22:source = "VTC.vn";break;
	case 23:source = "Kenh14.vn";break;
	case 24:source = "MucTim.com.vn";break;
	case 25:source = "AutoNet.com.vn";break;
	case 26:source = "AutoPro.ChannelVN.net";break;
	case 27:source = "TheGioiOto.com.vn";break;
	default:source = "";break;
	}
	document.write("Source: " + source);
}

function sendmail(url) {
	window.open(lang_path + "sendmail.php?url=" + encodeURI(url), "","width=468,height=450,menubar=0,resizable=1,scrollbars=0,statusbar=0,titlebar=0,toolbar=0");
}

function generate_star(star) {
	for ( var i = 0; i < star; i++) {
		document.write('<img align="absmiddle" src="' + con_root_path + 'images/icon_star.gif" />');
	}
}
-->